package com.example.cloud.dao.personal;

import com.example.cloud.model.personal.AttendanceRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by wangtao on 2018/5/22.
 */
@Repository
public interface AttendanceRepository extends JpaRepository<AttendanceRecord, Long>{
    @Modifying
    @Query("update attendance_record set status = ?1 where id = ?2")
    int updateStatus(int status, Long id);
    int deleteByIdIn(List<Long> ids);
}
